﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Resources;
using System.Linq;
using System.Web;

namespace DHQGHN.PM2.Models
{
    public class HouseHoldModel : ModelBase
    {
        public string HOUSEHOLD_ID { get; set; }

        [Display(Name = "Mã hộ")]
        [StringLength(8)]
        public string HOUSEHOLD_CODE { get; set; }

        [Display(Name = "Số hộ")]
        public int? HOUSEHOLD_NUMBER { get; set; }

        [Display(Name = "Tên chủ hộ")]
        [StringLength(50)]
        [RegularExpression(@"[^<>]+", ErrorMessage = "Không hợp lệ.")]
        public string HOUSEHOLD_NAME { get; set; }

        [Display(Name = "Địa bàn ĐT")]
        public string AREA_ID { get; set; }

        public string AREA_ID_NAME { get; set; }
        //phunx1, 20150516: bo truong EnumerationAreaID vi chi can AreaID la du roi
        //[Display(Name = "Mã ĐT viên")]
        //public long EnumerationAreaID { get; set; }

        [Display(Name = "Mã địa chỉ")]
        public string ADDRESS_ID { get; set; }

        public string ADDRESS_ID_NAME { get; set; }

        [Range(1, 50, ErrorMessage = "Số nhân khẩu không vượt quá 50.")]
        [RegularExpression("([0-9]+)")]
        [Display(Name = "Số nhân khẩu")]
        public int? NUM_OF_HH_MEMBER { get; set; }


        [Display(Name = "SĐT chủ hộ")]
        [DataType(DataType.PhoneNumber)]
        public string HH_HEAD_MOBILE { get; set; }

        [Display(Name = "Email chủ hộ")]
        [EmailAddress]
        public string HH_HEAD_EMAIL { get; set; }

        [Display(Name = "Chữ ký chủ hộ")]
        public string HH_HEAD_SIGNATURE { get; set; }

        [Display(Name = "Phương thức ĐT")]
        [Range(1, 3)]
        public string SURVEY_METHOD_ID { get; set; }

        public string SURVEY_METHOD_NAME { get; set; }

        public int? ONLINE_SURVEY_STATUS { get; set; }

        [Display(Name = "Đã xóa?")]
        [Range(0, 1)]
        public int DELETED { get; set; }

        public AddressModel Address { get; set; }

        public AreaModel Area { get; set; }
        public string LOGINCODE { get; set; }
    }


    public class EditHoDanCu {
        public string STRINGLAGLONG { get; set; }
    }

}